package com.kofigyan.stateprogressbarsample;

import com.kofigyan.stateprogressbarsample.not_stateprogressbar.pojo.MenuItem;

public class AnimationFourStatesActivity extends BaseAbility {

    @Override
    protected int getLayoutId() {
        return ResourceTable.Layout_ability_animation_four_states;
    }

    @Override
    protected void initMenuData() {
        super.initMenuData();
        types.add(new MenuItem(8, "Change Anim Start Delay"));
        types.add(new MenuItem(9, "Change Anim Duration"));
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        super.onOptionsItemSelected(item);
        if (stateProgressBar == null) {
            return false;
        }
        switch (item.getId()) {
            case 8:
                stateProgressBar.setAnimationStartDelay(5000);
                break;
            case 9:
                stateProgressBar.setAnimationDuration(5000);
                break;
        }

        return true;
    }
}
